import request from "@/utils/request";

/**
 * 轮播图
 */
export function banner(data) {
	return request({
		url: '/api/image/banner',
		method: 'get',
		data
	})
}

/**
 * 导航栏
 */
export function nav(data) {
	return request({
		url: '/api/image/navi',
		method: 'get',
		data
	})
}

/**
 * 推荐
 */
export function product(data) {
	return request({
		url: '/api/image/product',
		method: 'get',
		data
	})
}


/**
 * 推荐
 */
export function integralBanner(data) {
	return request({
		url: '/api/integral/banner',
		method: 'get',
		data
	})
}

/**
 * 推荐
 */
export function productList(data) {
	return request({
		url: '/api/image/push',
		method: 'get',
		data
	})
}

/**
 * 经销商入驻申请
 */
export function shoperRegister(data) {
	return request({
		url: '/api/manage/register/leader',
		method: 'POST',
		data
	})
}

/**
 * 经销商入驻申请
 */
export function shopRegister(data) {
	return request({
		url: '/api/manage/register/store',
		method: 'POST',
		data
	})
}

/**
 * 经销商审核
 * @param {Object} data
 */
export function verifyDo(data) {
	return request({
		url: '/api/manage/register/leaderexam',
		method: 'POST',
		data
	})
}

export function addCart(data) {
	return request({
		url: '/api/home/cart',
		method: 'GET',
		data
	})
}
/**
 * 分类商品列表
 */
export function productCategoryList(data) {
	return request({
		url: '/api/home/category/',
		method: 'get',
		data
	})
}

// 支付
export function pay(data) {
	return request({
		url: '/api/order/pay',
		method: 'POST',
		data
	})
}

export function prePay(data) {
	return request({
		url: '/api/order/preparePay',
		method: 'POST',
		data
	})
}


/**
 * 分类商品列表
 */
export function productDetail(data) {
	return request({
		url: '/api/home/product/',
		method: 'get',
		data
	})
}

/**
 * 经销商列表
 */
export function dealerList(data) {
	return request({
		url: '/api/manage/register/sarchleader/',
		method: 'get',
		data
	})
}

/**
 * 门店申请列表
 */
export function verifylist(data) {
	return request({
		url: '/api/manage/register/leaderex/',
		method: 'get',
		data
	})
}

/**
 * 购物车
 */
export function cartList(data) {
	return request({
		url: '/api/home/shop',
		method: 'get',
		data
	})
}